﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ERP_RORZE_PERMISSION.Base;
using ERP_RORZE_PRODUCT.Product.BasicList;
using ERP_RORZE_PRODUCT.Product.PartData;
using ERP_RORZE_PRODUCT.Product.Machine;
using ERP_RORZE_PRODUCT.Product.UserControls;
using ERP_RORZE_PRODUCT.Product.MO;
using ERP_RORZE_PRODUCT.Product.PartHandling;
using ERP_RORZE_PRODUCT.Product.Deadline;
using ERP_RORZE_PRODUCT.Product.MonthlyCharge;
using ERP_RORZE_PRODUCT.Product.Quotation;
using ERP_RORZE_PRODUCT.Product.WTS;
using ERP_RORZE_PRODUCT.Product.LINK_VCUONGDATABASE;
using ERP_RORZE_PRODUCT.Product.Incauhinh;
using ERP_RORZE_PRODUCT.Product.XLBM;
using ERP_RORZE_TOOL.Tool.BCThoigianlamviecthang;
using ERP_RORZE_TOOL.Tool.BaoCaoKeHoach;
using ERP_RORZE_TOOL.Tool.CheckThoiGianLamViec;
using ERP_RORZE_TOOL.Tool.NGNoibo;
using ERP_RORZE_PRODUCT.Product.Incauhinhmoi;

namespace ERP_RORZE_PRODUCT.Product
{
    public partial class ctrl_ProductMain : DevExpress.XtraEditors.XtraUserControl
    {
        
        public ctrl_ProductMain()
        {
            InitializeComponent();
            ShowHideLink();
        }

        private void navBarItemSection_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlSection ctrlSetion = new ctrlSection();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;

        }

        private void navBarItemWork_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlWork ctrlWork = new ctrlWork();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlWork);
            ctrlWork.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemOption_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlOption ctrlOption = new ctrlOption();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlOption);
            ctrlOption.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemJig_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlJig ctrlJig = new ctrlJig();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlJig);
            ctrlJig.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemExpence_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlExpence ctrlExpence = new ctrlExpence();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlExpence);
            ctrlExpence.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemPartList_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlPartList ctrlPartlist = new ctrlPartList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlPartlist);
            ctrlPartlist.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemPartMaterial_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlPartMaterial ctrlPartmaterial = new ctrlPartMaterial();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlPartmaterial);
            ctrlPartmaterial.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemOptionData_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlOptionData ctrlOptiondata = new ctrlOptionData();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlOptiondata);
            ctrlOptiondata.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMachineList_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMachineList ctrlMachine = new ctrlMachineList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMachine);
            ctrlMachine.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMachineGroup_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMachineGroup ctrlMachineGroup = new ctrlMachineGroup();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMachineGroup);
            ctrlMachineGroup.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMachineCapacity_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            frm_MachineCapacity ctrlMachinecapacity = new frm_MachineCapacity();
            
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMachinecapacity);
            ctrlMachinecapacity.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMachineDailyTime_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMachineDailyTime ctrlMachineDailytime = new ctrlMachineDailyTime();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMachineDailytime);
            ctrlMachineDailytime.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemBusOderList_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlBusOderList ctrlBusoderlist = new ctrlBusOderList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlBusoderlist);
            ctrlBusoderlist.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemBusOderCancel_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            CtrlBusOderCancel ctrlBusodercancel = new CtrlBusOderCancel();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlBusodercancel);
            ctrlBusodercancel.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemBusOderDeadlineChange_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlBusOderDeadline ctrlBusoderDeadline = new ctrlBusOderDeadline();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlBusoderDeadline);
            ctrlBusoderDeadline.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemBusOderQty_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlBusOderQtyChange ctrlBusoderqtychange = new ctrlBusOderQtyChange();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlBusoderqtychange);
            ctrlBusoderqtychange.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMoList_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMOList ctrlMO = new ctrlMOList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMO);
            ctrlMO.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMONoUpdate_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            frm_MONoUpdate ctrlMONoupdate = new frm_MONoUpdate();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMONoupdate);
            ctrlMONoupdate.Dock = DockStyle.Fill;
        }

        private void navBarItemMOSelect_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlMOSelect ctrlMOselect = new ctrlMOSelect();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOselect);
            ctrlMOselect.Dock = DockStyle.Fill;
        }

        private void navBarItemMOSheetView_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlMOSheetView ctrlMOsheetview = new ctrlMOSheetView();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOsheetview);
            ctrlMOsheetview.Dock = DockStyle.Fill;
        }

        private void navBarItemMOMaterial_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMOMaterial ctrlMOMat = new ctrlMOMaterial();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOMat);
            ctrlMOMat.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMOstart_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlMOStart ctrlMOstart = new ctrlMOStart();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOstart);
            ctrlMOstart.Dock = DockStyle.Fill;
        }

        private void navBarItemMOOption_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMOOption ctrlMOoption = new ctrlMOOption();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOoption);
            ctrlMOoption.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMOQtyStatus_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlMOQtyStatus ctrlMOQtystatus = new ctrlMOQtyStatus();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOQtystatus);
            ctrlMOQtystatus.Dock = DockStyle.Fill;
        }

        private void navBarItemMOQtyChange_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            frm_MOQtyChange ctrlMOQtychange = new frm_MOQtyChange();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOQtychange);
            ctrlMOQtychange.Dock = DockStyle.Fill;
        }

        private void navBarItemMOFinish_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            frm_MOFinish ctrlMOFinish = new frm_MOFinish();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOFinish);
            ctrlMOFinish.Dock = DockStyle.Fill;
        }

        private void navBarItemMOActualPrice_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMOActualPrice ctrlMOActual = new ctrlMOActualPrice();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOActual);
            ctrlMOActual.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMONGCheckDetail_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMONGCheckDetail ctrlMONGcheckdetail = new ctrlMONGCheckDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMONGcheckdetail);
            ctrlMONGcheckdetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMONGCheckInput_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            frm_MONGCheckInput ctrlMONGcheckinput = new frm_MONGCheckInput();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMONGcheckinput);
            ctrlMONGcheckinput.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMachineHandDetail_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMAchineHandDetail ctrlMachineHandDetail = new ctrlMAchineHandDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMachineHandDetail);
            ctrlMachineHandDetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemInspHandMisReturn_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlInspHandMisReturnDetail ctrlInspHandMisReturndetail = new ctrlInspHandMisReturnDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlInspHandMisReturndetail);
            ctrlInspHandMisReturndetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem3_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlHandInspMisReturnDetail ctrlHandInspMisReturndetail = new ctrlHandInspMisReturnDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlHandInspMisReturndetail);
            ctrlHandInspMisReturndetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem4_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlBusInspDetail ctrlBusInspdetail = new ctrlBusInspDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlBusInspdetail);
            ctrlBusInspdetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem5_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlInspBusMisReturnDetail ctrlInspBusMisReturndetail = new ctrlInspBusMisReturnDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlInspBusMisReturndetail);
            ctrlInspBusMisReturndetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem6_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlBusInspMisReturnDetail ctrlBusInspMisReturndetail = new ctrlBusInspMisReturnDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlBusInspMisReturndetail);
            ctrlBusInspMisReturndetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem7_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlInspAnodDetail ctrlInspAnoddetail = new ctrlInspAnodDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlInspAnoddetail);
            ctrlInspAnoddetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem8_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlAnodQtyChangeDetail ctrlAnodQtyChangedetail = new ctrlAnodQtyChangeDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlAnodQtyChangedetail);
            ctrlAnodQtyChangedetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem9_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlAnodInspDetail ctrlAnodInspdetail = new ctrlAnodInspDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlAnodInspdetail);
            ctrlAnodInspdetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem10_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlInspF3Detail ctrlInspF3detail = new ctrlInspF3Detail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlInspF3detail);
            ctrlInspF3detail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem11_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlF3StoreDetail ctrlF3Storedetail = new ctrlF3StoreDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlF3Storedetail);
            ctrlF3Storedetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemDeadlineConfirm_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlDeadlineConfirm ctrlDeadlineconfirm = new ctrlDeadlineConfirm();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlDeadlineconfirm);
            ctrlDeadlineconfirm.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemDeadlineCaculation_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlDeadlineCaculation ctrlDeadlinecaculation = new ctrlDeadlineCaculation();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlDeadlinecaculation);
            ctrlDeadlinecaculation.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMonthlyExpence_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMonthlyExpence ctrlMonthlyexpence = new ctrlMonthlyExpence();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMonthlyexpence);
            ctrlMonthlyexpence.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMonthlyChargeUpdate_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            frm_MonthlyChargeUpdate ctrlMonthlychargeUpdate = new frm_MonthlyChargeUpdate();
            ctrlMonthlychargeUpdate.ShowDialog();
            Cursor.Current = Cursors.Default;
            //spMain.Panel2.Controls.Clear();
            //spMain.Panel2.Controls.Add(ctrlMonthlychargeUpdate);
            //ctrlMonthlychargeUpdate.Dock = DockStyle.Fill;
        }

        private void navBarItemQuotationList_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlQuatationList ctrlQuationlist = new ctrlQuatationList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlQuationlist);
            ctrlQuationlist.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemQuotionMachine_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlQuotationMachine ctrlQuotaitonmachine = new ctrlQuotationMachine();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlQuotaitonmachine);
            ctrlQuotaitonmachine.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemQuotationMaterial_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlQuotationMaterial ctrlQuotationmaterial = new ctrlQuotationMaterial();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlQuotationmaterial);
            ctrlQuotationmaterial.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemQuotationCaculation_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlQuotationCaculation ctrlQuotioncaculation = new ctrlQuotationCaculation();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlQuotioncaculation);
            ctrlQuotioncaculation.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemQuotationView_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemMachineWTSDetail_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMachineWTSDetail ctrlMachineWTSdetail = new ctrlMachineWTSDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMachineWTSdetail);
            ctrlMachineWTSdetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemMachineWTSInput_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemMachineDailyReport_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemMachineDailyCheck_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemMachineWTSFind_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemWTSMachinetoGA_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlMachineWTStoGA ctrlMachineWTStoga = new ctrlMachineWTStoGA();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMachineWTStoga);
            ctrlMachineWTStoga.Dock = DockStyle.Fill;
        }

        private void navBarItemJigReport_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlJigReport ctrlJigreport = new ctrlJigReport();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlJigreport);
            ctrlJigreport.Dock = DockStyle.Fill;
        }

        private void navBarItemLaborWTSDeatail_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlLaborWTSDetail ctrlLaborWTSdetail = new ctrlLaborWTSDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlLaborWTSdetail);
            ctrlLaborWTSdetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemLaborWTSInput_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemStaffDailyWorkingTime_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemStaffWorkingTimeCheck_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemWTSLaborToGA_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemOverTime_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
        }

        private void navBarItemDataTranfer_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            frm_DataTranfer frmData = new frm_DataTranfer();
            frmData.Show();
            Cursor.Current = Cursors.Default;

        }

        private void navItemMOQtyStatus_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMOQtyStatus ctrlMOQtystatus = new ctrlMOQtyStatus();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOQtystatus);
            ctrlMOQtystatus.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem1_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlHandInspDetail ctrlHandInspdetail = new ctrlHandInspDetail();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlHandInspdetail);
            ctrlHandInspdetail.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem2_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMOOptionStatus ctrlMOOptionStatus = new ctrlMOOptionStatus();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMOOptionStatus);
            ctrlMOOptionStatus.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navMachineConfiguration_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMachineConfiguration ctrlMaconfig = new ctrlMachineConfiguration();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlMaconfig);
            ctrlMaconfig.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItemJigReport_LinkClicked_1(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlJigReport ctrlJigReport = new ctrlJigReport();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlJigReport);
            ctrlJigReport.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navNhaplenhtinhTGGC_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlKH_NhaplenhtinhthoigianGC ctrlKH = new ctrlKH_NhaplenhtinhthoigianGC();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlKH);
            ctrlKH.Dock = DockStyle.Fill;
        }

        private void navKHGC_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlNhapOderlapKHGC ctrlKHGC = new ctrlNhapOderlapKHGC();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlKHGC);
            ctrlKHGC.Dock = DockStyle.Fill;
        }

        private void navBarItem12_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMaterial ctrlKHGC = new ctrlMaterial();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlKHGC);
            ctrlKHGC.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem13_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlPartList ctrlKHGC = new ctrlPartList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlKHGC);
            ctrlKHGC.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navCustomer_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlCustomer ctrlSetion = new ctrlCustomer();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navOvertime_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlOverTime ctrlSetion = new ctrlOverTime();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navKHKTra_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlNhapOrderlapKHKtra ctrlSetion = new ctrlNhapOrderlapKHKtra();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
        }

        private void navKHVia_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlNhapOderLapKHvia ctrlSetion = new ctrlNhapOderLapKHvia();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
        }

        private void navBarItem17_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ctrlKHKT06 ctrlSetion = new ctrlKHKT06();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
        }

        private void navOther_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlOther ctrlSetion = new ctrlOther();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navDSLVL_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlDSLVL ctrlSetion = new ctrlDSLVL();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navKieuchitiet_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlKieuchitet ctrlSetion = new ctrlKieuchitet();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;

        }

        private void navLoaicauhinh_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlLoaicauhinh ctrlSetion = new ctrlLoaicauhinh();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navMaterialform_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMaerialForm ctrlSetion = new ctrlMaerialForm();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navPCPKD_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlPCPKD ctrlSetion = new ctrlPCPKD();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navconfig_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMachineConfiguration ctrlSetion = new ctrlMachineConfiguration();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navtableImport_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlFormImport ctrlSetion = new ctrlFormImport();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBCKH_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ucBaoCaoKeHoach ctrlSetion = new ucBaoCaoKeHoach();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navNGNoibo_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ucNGNoibo ctrlSetion = new ucNGNoibo();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBCWorkTime_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ucBCTimeMonth ctrlSetion = new ucBCTimeMonth();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navCheckTime_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ucCheckWorkTime ctrlSetion = new ucCheckWorkTime();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem14_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlXLBM ctrlSetion = new ctrlXLBM();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navInCauHinh_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlIncauhinhReport ctrlSetion = new ctrlIncauhinhReport();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navInLenh_LinkClicked_1(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ucInLenh ctrlSetion = new ucInLenh();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem15_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlConfigureList ctrlSetion = new ctrlConfigureList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem16_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlKinhDoanhList ctrlSetion = new ctrlKinhDoanhList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem17_LinkClicked_1(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlRessionList ctrlSetion = new ctrlRessionList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem18_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlRequireList ctrlSetion = new ctrlRequireList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem19_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlShapeList ctrlSetion = new ctrlShapeList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem20_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlConfigureData ctrlSetion = new ctrlConfigureData();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navKHHN_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlKHHangNgay ctrlSetion = new ctrlKHHangNgay();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navKHT_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlKHTong ctrlSetion = new ctrlKHTong();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navListIncauhinh_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlList ctrlSetion = new ctrlList();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarItem21_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlMeMa ctrlSetion = new ctrlMeMa();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navHT_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ctrlHangTonTaiXLBM ctrlSetion = new ctrlHangTonTaiXLBM();
            spMain.Panel2.Controls.Clear();
            spMain.Panel2.Controls.Add(ctrlSetion);
            ctrlSetion.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        ///////////////////////////////////////////
        /// Check role
        ///////////////////////////////////////////
        private void ShowHideLink()
        {
            Permission role = new Permission();
            role.Is_Login();
            if (role.HasNotRight(PermissionConstants.Functions.Product.PartMaterial))
                navBarItemPartMaterial.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.OptionData))
                navBarItemOptionData.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MaterialList))
                navBarItem12.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.PartList))
                navBarItem13.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Customer))
                navCustomer.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.OverTime))
                navOvertime.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MachineList))
                navBarItemMachineList.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MachineGroup))
                navBarItemMachineGroup.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MachineDailyTime))
                navBarItemMachineDailyTime.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.BusOderList))
                navBarItemBusOderList.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MOList))
                navBarItemMoList.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MOMaterial))
                navBarItemMOMaterial.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MOOption))
                navBarItemMOOption.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MOActualPrice))
                navBarItemMOActualPrice.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MONGCheckDetail))
                navBarItemMONGCheckDetail.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MOQtySatus))
                navItemMOQtyStatus.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MOOptionStatus))
                navBarItem2.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.InLenh))
                navInLenh.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Machine_Hand))
                navBarItemMachineHandDetail.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Insp_Hand_Return))
                navBarItemInspHandMisReturn.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Hand_Insp_Return))
                navBarItem3.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Hand_Insp))
                navBarItem1.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Bus_Insp))
                navBarItem4.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Insp_Bus_Return))
                navBarItem5.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Bus_Insp_Return))
                navBarItem6.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Insp_Anod))
                navBarItem7.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Anod_Qty_Change))
                navBarItem8.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Anod_Insp))
                navBarItem9.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Insp_F3))
                navBarItem10.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.F3_Store))
                navBarItem11.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Deadline_Confirm))
                navBarItemDeadlineConfirm.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Deadline_Caculation))
                navBarItemDeadlineCaculation.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Monthly_Expence))
                navBarItemMonthlyExpence.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.Monthly_Charge_Update))
                navBarItemMonthlyChargeUpdate.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.QuotationList))
                navBarItemQuotationList.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.QuotationMachine))
                navBarItemQuotionMachine.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.QuotationMaterial))
                navBarItemQuotationMaterial.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.QuotationCaculation))
                navBarItemQuotationCaculation.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.QuotationView))
                navBarItemQuotationView.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MachineWTS))
                navBarItemMachineWTSDetail.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.LaborWTS))
                navBarItemLaborWTSDeatail.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.DataTranfer))
                navBarItemDataTranfer.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.JigReport))
                navBarItemJigReport.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.F2_WTS_Detail_Report))
                navWTSNGDetail.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.LinhVCuong))
                navOther.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.BaoCaoKeHoach))
                navBCKH.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.NGNoiBo))
                navNGNoibo.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.CheckThoiGianLamViec))
                navCheckTime.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.TGLamViecThang))
                navBCWorkTime.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.XLBM))
                navXLBM.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.KH_HangNgay))
                navKHHN.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.HangTon))
                navHT.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.KH_Tong))
                navKHT.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.MeMa))
                navBarItem21.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.ConfigureList))
                navBarItem15.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.KinhDoanhList))
                navBarItem16.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.RessionList))
                navBarItem17.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.RequireList))
                navBarItem18.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.ShapeList))
                navBarItem19.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.ConfigureData))
                navBarItem20.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.ListQuery))
                navListIncauhinh.Enabled = false;

            if (role.HasNotRight(PermissionConstants.Functions.Product.TableImport))
                navtableImport.Enabled = false;
        }
    }
}
